package com.hfy.pcberpbackend.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 报价单状态日志表实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("quote_status_logs")
public class QuoteStatusLog {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 报价单ID
     */
    @NotNull(message = "报价单ID不能为空")
    @TableField("quote_id")
    private Long quoteId;
    
    /**
     * 原状态
     */
    @TableField("old_status")
    private String oldStatus;
    
    /**
     * 新状态
     */
    @NotBlank(message = "新状态不能为空")
    @TableField("new_status")
    private String newStatus;
    
    /**
     * 变更原因
     */
    @TableField("change_reason")
    private String changeReason;
    
    /**
     * 操作人
     */
    @NotBlank(message = "操作人不能为空")
    @TableField("operator")
    private String operator;
    
    /**
     * 创建时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
} 